from typing import List
class Solution:
    def countEven(self, num: int) -> int:
        sum = 0
        # 定义函数对整数拆分，求各数之和
        def cf(n):
            sum_n = 0
            strn = str(n)
            for i in range(len(strn)):
                sum_n += (int(strn[i]))
            if sum_n %2 == 0:
                print(n)
                return 1
            else: return 0
        for i in range(1,num+1):
            # 对每个数进行
            print(i)
            sum += cf(i)
        return sum



if __name__ == '__main__':
    nums = 4
    solution = Solution()
    val = solution.countEven(nums)
    print(val)
